﻿using System;
using System.Windows;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SPNetworkTopology.ExternalWindows.View;

namespace SPNetworkTopology
{
    class VisioOperation
    {
        public void LaunchDialog(Window dialog)
        {
            System.Windows.Interop.WindowInteropHelper hwndHelper = new System.Windows.Interop.WindowInteropHelper(dialog);
            hwndHelper.Owner = new IntPtr(Globals.ThisAddIn.Application.WindowHandle32);           

            // show our window
            dialog.ShowDialog();

            // if OK was selected then do work
            if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
            {
                // do any work based on the success of the DialogResult property
            }
        }

        public void GenerateDiagram()
        {
            GenerateDiagram genDiagram = new GenerateDiagram();
            genDiagram.CreateDiagram();
        }
       
    }
}
